package com.jiazhong.boot.mybatis.plus.test;

import com.jiazhong.boot.commons.bean.plus.Teacher;
import com.jiazhong.boot.mybatis.plus.service.TeacherService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.stereotype.Component;

import java.util.List;

@Slf4j
@SpringBootTest
@Component
public class TeacherApp {
    @Resource
    private TeacherService service;

    @Test
    public void a() {
        Teacher teacher = new Teacher();
        teacher.setUsername("abcd");
        service.save(teacher);
    }

    @Test
    public void b(){
        List<Teacher> list = service.list();
    }
}
